package com.scnlf.scnlf.portal.core.business.loan.service;

import com.scnlf.scnlf.portal.core.business.loan.entity.LoanTicketEntity;

public interface ILoanTicketService {

  /**
   * 根据主键查询
   * @param id
   * @return
   */
  LoanTicketEntity getById(Long id);

  Long calculateLeaveQuantity(LoanTicketEntity loanTicket, Long usedQuantity);

  /**
   * 校验是否能约券
   * @param loanTicket 当前券单
   * @param quantity 约券数量
   * @param usedQuantity 已经占用额度，批量约券使用
   * @return
   */
  void validEnableLoan(LoanTicketEntity loanTicket, Long quantity, Long usedQuantity);

}
